import { IPSLanguageRes } from './ipslanguage-res';
import { PSModelObjectImpl } from '../psmodel-object-impl';

export class PSLanguageResImpl extends PSModelObjectImpl implements IPSLanguageRes {
  get codeName(): string {
    return this.M.codeName;
  }

  get defaultContent(): string {
    return this.M.defaultContent;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get lanResTag(): string {
    return this.M.lanResTag;
  }

  get lanResType():
    | 'DE.LNAME'
    | 'DEF.LNAME'
    | 'CL.ITEM.LNAME'
    | 'CL.ITEM.TOOLTIP'
    | 'TBB.TEXT'
    | 'TBB.TOOLTIP'
    | 'MENUITEM.CAPTION'
    | 'PAGE.HEADER'
    | 'PAGE.COMMON'
    | 'PAGE'
    | 'CONTROL'
    | 'ERROR.STD'
    | 'CTRL'
    | 'COMMON'
    | 'OTHER' {
    return this.M.lanResType;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  get orderValue(): number {
    return this.M.orderValue != null ? this.M.orderValue : 99999;
  }

  get refFlag(): boolean {
    return this.M.refFlag != null ? this.M.refFlag : false;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get cls(): string {
    return 'PSLanguageResImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'IPSModelObject' || cls == 'IPSModelSortable' || cls == 'IPSObject' || cls == 'res.IPSLanguageRes') return true;
    return super.instanceof(cls);
  }
}
